{% extends 'layout.html' %}

{% block body %}
<div class="container content">
  <div class="card">
    <div class="card-header">
      添加笔记
    </div>
    <div class="card-body">
      {% from "includes/_formhelpers.html" import render_field %}
      <form method="POST" action="">
        <div class="form-group">
          {{ render_field(form.title, class_="form-control") }}
        </div>
        <div class="form-group">
          {{ render_field(form.content, class_="form-control content-text", id="editor") }}
        </div>
        <input class="btn btn-primary" type="submit" value="提交">
      </form>
    </div>
  </div>
</div>
<script src="//cdn.ckeditor.com/4.11.2/standard/ckeditor.js"></script>
<script type="text/javascript">
  CKEDITOR.replace( 'editor')
</script>
{% endblock %}
